
/* First created by JCasGen Mon Mar 28 12:51:53 CEST 2011 */
package ia1011.zanzibar.chaos.type;

import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.FSGenerator;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.impl.FeatureImpl;
import org.apache.uima.cas.Feature;
import org.apache.uima.jcas.cas.TOP_Type;

/** An Inter-Constituent Dependency (ICD) is a syntactic relation among two constituents: the head and the modifier represented respectively by the from and the to of this structure.
 * Updated by JCasGen Mon Mar 28 12:52:46 CEST 2011
 * @generated */
public class UimaDependency_Type extends TOP_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {return fsGenerator;}
  /** @generated */
  private final FSGenerator fsGenerator = 
    new FSGenerator() {
      public FeatureStructure createFS(int addr, CASImpl cas) {
  			 if (UimaDependency_Type.this.useExistingInstance) {
  			   // Return eq fs instance if already created
  		     FeatureStructure fs = UimaDependency_Type.this.jcas.getJfsFromCaddr(addr);
  		     if (null == fs) {
  		       fs = new UimaDependency(addr, UimaDependency_Type.this);
  			   UimaDependency_Type.this.jcas.putJfsFromCaddr(addr, fs);
  			   return fs;
  		     }
  		     return fs;
        } else return new UimaDependency(addr, UimaDependency_Type.this);
  	  }
    };
  /** @generated */
  public final static int typeIndexID = UimaDependency.typeIndexID;
  /** @generated 
     @modifiable */
  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("ia1011.zanzibar.chaos.type.UimaDependency");
 
  /** @generated */
  final Feature casFeat_kind;
  /** @generated */
  final int     casFeatCode_kind;
  /** @generated */ 
  public String getKind(int addr) {
        if (featOkTst && casFeat_kind == null)
      jcas.throwFeatMissing("kind", "ia1011.zanzibar.chaos.type.UimaDependency");
    return ll_cas.ll_getStringValue(addr, casFeatCode_kind);
  }
  /** @generated */    
  public void setKind(int addr, String v) {
        if (featOkTst && casFeat_kind == null)
      jcas.throwFeatMissing("kind", "ia1011.zanzibar.chaos.type.UimaDependency");
    ll_cas.ll_setStringValue(addr, casFeatCode_kind, v);}
    
  
 
  /** @generated */
  final Feature casFeat_plausibility;
  /** @generated */
  final int     casFeatCode_plausibility;
  /** @generated */ 
  public float getPlausibility(int addr) {
        if (featOkTst && casFeat_plausibility == null)
      jcas.throwFeatMissing("plausibility", "ia1011.zanzibar.chaos.type.UimaDependency");
    return ll_cas.ll_getFloatValue(addr, casFeatCode_plausibility);
  }
  /** @generated */    
  public void setPlausibility(int addr, float v) {
        if (featOkTst && casFeat_plausibility == null)
      jcas.throwFeatMissing("plausibility", "ia1011.zanzibar.chaos.type.UimaDependency");
    ll_cas.ll_setFloatValue(addr, casFeatCode_plausibility, v);}
    
  
 
  /** @generated */
  final Feature casFeat_from;
  /** @generated */
  final int     casFeatCode_from;
  /** @generated */ 
  public int getFrom(int addr) {
        if (featOkTst && casFeat_from == null)
      jcas.throwFeatMissing("from", "ia1011.zanzibar.chaos.type.UimaDependency");
    return ll_cas.ll_getRefValue(addr, casFeatCode_from);
  }
  /** @generated */    
  public void setFrom(int addr, int v) {
        if (featOkTst && casFeat_from == null)
      jcas.throwFeatMissing("from", "ia1011.zanzibar.chaos.type.UimaDependency");
    ll_cas.ll_setRefValue(addr, casFeatCode_from, v);}
    
  
 
  /** @generated */
  final Feature casFeat_to;
  /** @generated */
  final int     casFeatCode_to;
  /** @generated */ 
  public int getTo(int addr) {
        if (featOkTst && casFeat_to == null)
      jcas.throwFeatMissing("to", "ia1011.zanzibar.chaos.type.UimaDependency");
    return ll_cas.ll_getRefValue(addr, casFeatCode_to);
  }
  /** @generated */    
  public void setTo(int addr, int v) {
        if (featOkTst && casFeat_to == null)
      jcas.throwFeatMissing("to", "ia1011.zanzibar.chaos.type.UimaDependency");
    ll_cas.ll_setRefValue(addr, casFeatCode_to, v);}
    
  



  /** initialize variables to correspond with Cas Type and Features
	* @generated */
  public UimaDependency_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());

 
    casFeat_kind = jcas.getRequiredFeatureDE(casType, "kind", "uima.cas.String", featOkTst);
    casFeatCode_kind  = (null == casFeat_kind) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_kind).getCode();

 
    casFeat_plausibility = jcas.getRequiredFeatureDE(casType, "plausibility", "uima.cas.Float", featOkTst);
    casFeatCode_plausibility  = (null == casFeat_plausibility) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_plausibility).getCode();

 
    casFeat_from = jcas.getRequiredFeatureDE(casType, "from", "ia1011.zanzibar.chaos.type.UimaConstituent", featOkTst);
    casFeatCode_from  = (null == casFeat_from) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_from).getCode();

 
    casFeat_to = jcas.getRequiredFeatureDE(casType, "to", "ia1011.zanzibar.chaos.type.UimaConstituent", featOkTst);
    casFeatCode_to  = (null == casFeat_to) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_to).getCode();

  }
}



    